package org.aiforum.domain;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * 板块
 * @author VIC
 *
 */
@NamedQueries({@NamedQuery(name="queryPlateByState",query="from Plate p where p.plateState=:plateState")})
@Entity
@Table(name="ai_plate")
public class Plate {
	
	@Id// 标识属性为主键
	@GeneratedValue(strategy=GenerationType.SEQUENCE,generator="plate_sequence")// 标识主键生成值
	@SequenceGenerator(sequenceName="SEQ_PLATE",name="plate_sequence",initialValue=1,allocationSize=1)// 标识定义序列生成器
	private int plateId;// 板块ID
	
	@Column(name="plateName")
	private String plateName;//板块名称
	
	@Column(name="plateDescribe")
	private String plateDescribe;//板块描述
	
	@Column(name="plateState")
	private int plateState;//板块状态
    
	
	public Plate(){}
	
	public Plate(int plateId, String plateName, String plateDescribe, int plateState) {
		this.plateId = plateId;
		this.plateName = plateName;
		this.plateDescribe = plateDescribe;
		this.plateState = plateState;
	}

	public int getPlateId() {
		return plateId;
	}

	public void setPlateId(int plateId) {
		this.plateId = plateId;
	}

	public String getPlateName() {
		return plateName;
	}

	public void setPlateName(String plateName) {
		this.plateName = plateName;
	}

	public String getPlateDescribe() {
		return plateDescribe;
	}

	public void setPlateDescribe(String plateDescribe) {
		this.plateDescribe = plateDescribe;
	}

	public int getPlateState() {
		return plateState;
	}

	public void setPlateState(int plateState) {
		this.plateState = plateState;
	}

	@Override
	public String toString() {
		return "Plate [plateId=" + plateId + ", plateName=" + plateName + ", plateDescribe=" + plateDescribe
				+ ", plateState=" + plateState + "]";
	}

	
}
